Generating sparse sample histograms in image processing

ABSTRACT

Apparatus for binning an input value into an array of bins, each bin representing a range of input values and the bins collectively representing a histogram of input values, the apparatus comprising: an input for receiving the input value; a memory for storing the array; and a binning controller configured to: derive a plurality of bin values from the input value according to a binning distribution located about the input value, the binning distribution spanning a range of input values and each bin value having a respective input value dependent on the position of the bin value in the binning distribution; and allocate the plurality of bin values to a plurality of bins in the array, each bin value being allocated to a bin selected according to the respective input value of the bin value.

BACKGROUND OF THE INVENTION

This invention relates to apparatus for generating a histogram of inputvalues and to a method of binning input values so as to generate such ahistogram.

The processing pipelines of digital cameras commonly make use ofhistograms to summarise the frequency distribution of parameterscaptured by pixels of the camera sensor such as exposure or colourchannel parameters. A histogram divides the range of possible inputvalues of a parameter into a series of bins, with each bin representinga count of the number of pixels having a parameter falling within therespective range of that bin. Such histograms can be used by the imageprocessing algorithms of the pipeline in order to perform controlfunctions of the camera such as auto-exposure, auto-focus and auto-whitebalance. A camera sensor will generally include many millions of pixelsand the use of such histograms helps to provide a summary of thecharacteristics of a captured frame at a level of detail which isappropriate and manageable by pipeline algorithms.

BRIEF SUMMARY OF THE INVENTION

According to a first aspect of the present invention there is providedapparatus for binning an input value into an array of bins, each binrepresenting a range of input values and the bins collectivelyrepresenting a histogram of input values, the apparatus comprising:

-   -   an input for receiving the input value;    -   a memory for storing the array; and    -   a binning controller configured to:        -   derive a plurality of bin values from the input value            according to a binning distribution located about the input            value, the binning distribution spanning a range of input            values and each bin value having a respective input value            dependent on the position of the bin value in the binning            distribution; and        -   allocate the plurality of bin values to a plurality of bins            in the array, each bin value being allocated to a bin            selected according to the respective input value of the bin            value.

The binning distribution may be centred on the input value.

The binning distribution may be a Gaussian distribution or anapproximation thereto.

The input value may be an image characteristic derived from one or morepixels of an image frame.

The binning controller may be configured to select the span of thebinning distribution according to one or more predefined or adaptiveparameters.

The binning controller may be configured to select the span of thebinning distribution in dependence on a measure of the sparsity of thehistogram represented by the array of bins.

The binning controller may be configured to, prior to allocating each ofthe plurality of bin values to its respective bin, decay the values heldat the array of bins according to a predefined decay factor.

The binning controller may be configured to derive the plurality of binvalues from the input value by scaling the binning distribution by theinput value, each of the bin values being the scaled height of thebinning distribution at the respective bin of the array.

The binning controller may be configured to normalise the histogram suchthat the bins of the array sum to 1.

Each bin of the array may have a width equal to a unit of the inputvalue.

The input value may be received at the input expressed as a plurality ofcomponent values.

According to a second aspect of the present invention there is provideda data processing device for detecting a change in a sequence of inputvalues, the data processing device comprising:

-   -   apparatus as described herein and configured to generate the        histogram of input values by binning a plurality of input values        of the sequence into the array of bins; and    -   change detection logic configured to use the histogram to        estimate the likelihood of the received input value and generate        a measure of change in the input values in dependence on the        estimated likelihood.

The estimated likelihood may represent a measure of probability of thereceived input value occurring given the frequency distribution of inputvalues represented by the histogram.

The change detection logic may be configured to form the measure ofprobability in dependence on the value of the bin in the arraycorresponding to the received input value.

The change detection logic may be configured to derive a normalisedhistogram from the bins of the array and use the value of the bin of thenormalised histogram which corresponds to the received input value asthe measure of probability.

The change detection logic may be configured to derive the normalisedhistogram such that the bins of the histogram sum to 1.

The change detection logic may be configured to generate the measure ofchange in the input values by comparing the estimated likelihood to apredefined or adaptive threshold.

The measure of change may be indicative of a change in the sequence ofinput values if the estimated likelihood exceeds the predefined oradaptive threshold.

The change detection logic may be configured to form the adaptivethreshold by summing the bins in order of decreasing value andidentifying a threshold bin at which that sum first exceeds a predefinedtotal, and to derive the adaptive threshold in dependence on the valueof the threshold bin.

The input values may be image characteristics received for a block ofpixels of a frame and the data processing device is for detecting motionin the block of pixels.

The indication of change may be a binary value identifying whether ornot the estimated likelihood is indicative of change in the sequence ofinput values.

The input value may be one or more of luminance, hue, lightness,brightness, chroma, colorfulness, saturation, or a measure of variationtherein.

According to a third aspect of the present invention there is provided amethod of binning an input value into an array of bins, each binrepresenting a range of input values and the bins collectivelyrepresenting a histogram of input values, the method comprising:

-   -   receiving an input value;    -   deriving a plurality of bin values from the input value        according to a binning distribution located about the input        value, the binning distribution spanning a range of input values        and each bin value having a respective input value indicated by        the position of the bin value in the binning distribution; and    -   allocating the plurality of bin values to a plurality of bins,        each bin value being allocated to a bin selected according to        the respective input value of the bin value.

The method may further comprise, prior to allocating each of theplurality of bin values to its respective bin, decaying the values heldat the array of bins according to a predefined decay factor.

The deriving the plurality of bin values from the input value maycomprise scaling the binning distribution by the input value, each ofthe bin values being the scaled height of the binning distribution atthe respective bin of the array.

The method may comprise:

-   -   binning a plurality of input values of the sequence into the        array of bins so as to generate the histogram of input values;    -   using the histogram to estimate the likelihood of the received        input value; and    -   in dependence on the estimated likelihood, generating a measure        of change in the input values.

The estimated likelihood may represent a measure of probability of thereceived input value occurring given the frequency distribution of inputvalues represented by the histogram.

The using the histogram may comprise forming the measure of probabilityin dependence on the value of the bin in the array corresponding to thereceived input value.

The using the histogram may comprise deriving a normalised histogramfrom the bins of the array and using the value of the bin of thenormalised histogram which corresponds to the received input value asthe measure of probability.

The generating a measure of change may comprise comparing the estimatedlikelihood to a predefined or adaptive threshold.

The measure of change may be indicative of change in the sequence ofinput values if the estimated likelihood exceeds the predefined oradaptive threshold.

The method may further comprise forming the adaptive threshold by:

-   -   summing the bins in order of decreasing value so as to identify        a threshold bin at which that sum first exceeds a predefined        total; and    -   deriving the adaptive threshold in dependence on the value of        the threshold bin.

The apparatus may be embodied in hardware on an integrated circuit.There may be provided a method of manufacturing, at an integratedcircuit manufacturing system, the apparatus. There may be provided anintegrated circuit definition dataset that, when processed in anintegrated circuit manufacturing system, configures the system tomanufacture the apparatus. There may be provided a non-transitorycomputer readable storage medium having stored thereon a computerreadable description of an integrated circuit that, when processed in anintegrated circuit manufacturing system, causes the integrated circuitmanufacturing system to manufacture the apparatus.

There may be provided an integrated circuit manufacturing systemcomprising:

-   -   a non-transitory computer readable storage medium having stored        thereon a computer readable integrated circuit description that        describes the apparatus;    -   a layout processing system configured to process the integrated        circuit description so as to generate a circuit layout        description of an integrated circuit embodying the apparatus;        and    -   an integrated circuit generation system configured to        manufacture the apparatus according to the circuit layout        description.

There may be provided computer program code for performing a method asdescribed herein. There may be provided non-transitory computer readablestorage medium having stored thereon computer readable instructionsthat, when executed at a computer system, cause the computer system toperform the methods as described herein.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described by way of example withreference to the accompanying drawings. In the drawings:

FIG. 1 is a schematic diagram of apparatus for performing motiondetection in a stream of video frames captured at a camera.

FIG. 2 illustrates a sparse histogram formed by binning into a singlebin each luminance value formed in respect of a block of a frame.

FIG. 3 illustrates a histogram formed in accordance with the principlesdescribed herein from the same set of luminance values represented inFIG. 2.

FIG. 4 is a flowchart illustrating processing which may be performed atan image processor.

FIG. 5 illustrates the bin values of the histogram shown in FIG. 3ordered by size.

FIG. 6 is a flowchart illustrating the operation of a binning controllerand motion detector according to a first aspect.

FIG. 7 illustrates a binary output from a motion detector operated on animage frame divided into a plurality of blocks.

FIG. 8 is a schematic diagram of an integrated circuit manufacturingsystem.

DETAILED DESCRIPTION OF THE INVENTION

The following description is presented by way of example to enable aperson skilled in the art to make and use the invention. The presentinvention is not limited to the embodiments described herein and variousmodifications to the disclosed embodiments will be apparent to thoseskilled in the art.

One example of the use of histograms is for performing motion detectionin a sequence of frames captured by a camera sensor. For example, thiscan be a useful feature in security cameras since it allows the camerato flag up periods of motion in a video feed or to only record ortransmit the captured video stream when motion is detected. It is oftenthe case that very limited resources are available in camera hardware orassociated processing equipment to perform motion detection and/or it isdesired that motion detection is performed at low power. As a result,frames captured by a camera sensor are typically downsampled (e.g. fromHD to VGA resolution) and motion detection performed in the downsampledframes at a low frame rate (e.g. at 10-15 frames per second rather thanthe, say, 30 frames per second provided by the camera sensor).

In order to further reduce the processing burden, frames are typicallydivided into a set of blocks in respect of which motion detection isperformed, with each block comprising a plurality of pixels of theframe. To facilitate motion detection processing (and potentially otherimage processing functions) on a per-block basis, a camera pipeline maygenerate histograms for each block representing the frequencydistribution of image parameters within a block and potentially overseveral frames. For example, a histogram may be generated representing atypical measure of luminance for a block and motion may be identified inthat block by looking for a sudden change in the luminance of the blockwhich is indicative of motion.

However, the use of a limited number of pixels or sampling points perblock for a parameter and/or the use of narrow bins and/or the use of alow frame rate can lead to a sparsely-populated histogram beinggenerated for a block, i.e. a histogram having a substantial proportionof empty bins and gaps in the histogram distribution. Such a histogrammay be termed a sparse histogram. An example of a sparse histogram isshown in FIG. 2.

Sparse histograms tend to be a poor quality representation of theunderlying frequency distribution for a parameter. Sparse histograms maybe filtered before use in order to form an improved estimate of theunderlying frequency distribution for the parameter represented by thehistogram. Such filtering is typically performed so as to generate adenser histogram to produce a smoothed distribution without significantgaps. Filtering sparse histograms in this manner requires an additionalprocessing step and can result in a loss of fidelity (e.g. attenuationof intermediate peaks in multi-modal distributions).

Apparatus and methods are described for generating a histogram of aninput value which are particularly suitable for use with a sparsedataset of input values. In the examples described herein, the apparatusand methods relate to the performance of motion detection in a sequenceof image frames. Generally, the apparatus and methods may be forgenerating a histogram of any input value for any purpose, including forgenerating a histogram of any image characteristic received from acamera sensor or pipeline and for generating a histogram of any audiocharacteristic received from an audio source. Apparatus and methodsconfigured as described herein may be configured for the purpose ofdetecting a change in the input values: such change detection is notlimited to the performance of motion detection in a sequence of imageframes. It will be appreciated that any of the examples, features orfunctions described below with respect to generating a histogram of aparticular image characteristic (e.g. luminance or its standarddeviation) may be generally applied to the generation of a histogram forany other image characteristic, audio characteristic, or other inputvalue from any source and for any purpose, not limited to motiondetection.

Aspects of the present invention will now be described by way of examplewith respect to the apparatus shown in FIG. 1 for performing motiondetection in a sequence of video frames captured at a camera.

FIG. 1 is a schematic diagram of apparatus which includes a cameramodule 101 and a motion detector 115. The camera module 101 comprises acamera sensor 102 which is arranged to provide frames to an imageprocessor 103. The image processor 103 may generate various imagecharacteristics for use at the motion detector and potentially otherprocessing units on or outside the camera pipeline.

For example, the image processor may gather statistics for use at autowhite balance and auto exposure functions of a camera pipeline. Theimage processor is configured to provide image characteristics for oneor more blocks of a frame. For example, each frame may be divided into aset of 16 blocks, with the image processor generating imagecharacteristics in respect of each of the blocks.

A block may be part or all of a frame and any given block may or may notoverlap with other blocks of the same frame. A block may be anycollection of one or more pixels of a frame and may take any shape. Thepixels of a block may or may not be contiguous within a frame. One ormore pixels of a frame may not belong to any block defined for theframe. Any given pixel of a frame may belong to one or more blocks.

The image processor may be configured to generate image characteristicsindependently for one or more of the colour channels of an image frame(e.g. for each of the red, green and blue channels in the case of an RGBimage captured at the camera). A measure of luminance provided by theimage processor may be provided as a set of colour components or otherimage characteristics for interpretation at the motion detector as ameasure of luminance.

A flowchart 400 illustrating an exemplary operation of the imageprocessor 103 is shown in FIG. 4. The image processor receives a rawimage 401 (of input stream 104) from the camera sensor 102 and performsBayer space processing 402 and demosaicing 403 of the image. At 404 theimage processor converts the raw image into an RGB image on which theimage processor calculates statistics 405 for use at auto exposure andauto white balance functions of the camera pipeline (not shown). Thesestatistics may be included in the image characteristics 108 provided tothe motion detector 115. The image processor may additionally performfurther RGB space processing 406, such as colour correction. The imageprocessor converts the RGB image frame into the YUV colour space 407 soas to generate a YUV image frame 408, on which YUV space processing 409may be performed (e.g. contrast enhancement). The resulting YUV framesmay be provided at one or more different scales 410, 411 according tothe requirements of subsequent units taking their input from the imageprocessor, such as encoder 106. In this example, scalar 410 maycorrespond to the stream of frames 105 provided to the encoder 106 forencoding into a video stream 107. Encoder 106 may receive frames via aframe store 118 at which frame data from the camera sensor, potentiallyprocessed by the image processor 103, may be stored. In some examples,the motion detector may receive a stream of frames from the imageprocessor 103 (e.g. scalar 411).

Image processing may be performed by image processor 103 at a lowerresolution than that captured by the camera sensor. For example, thecamera sensor may be a HD sensor but image processing may be performedat, say, VGA resolution (640×480 pixels). Lower resolutions such as VGAare typically sufficient for the purpose of generating statistics formotion detection and reduces the processing capabilities required of theimage processor and/or allows image processing to be performed at lowpower. In some examples, the image frames captured by the camera sensormay be downscaled before being provided to the image processor, with thecamera sensor providing full resolution frames directly to the encoder106 (possibly via data store 118 and/or another unit, e.g. to convertraw frames into YUV frames). The image processor may be configured toprovide image characteristics describing one or more blocks of eachframe for use at the motion detector but not the image framesthemselves.

The arrangement of camera module 101 shown in FIG. 1 is merely onepossibility and it will be appreciated that various other arrangementsof a camera module are possible. In particular, the presence orotherwise of encoder 106 is not relevant to the operation of motiondetector 115 and is included merely for illustrative purposes. Thecamera module 101 need only provide image characteristics 108 for themotion detector which are sufficient for the motion detector to form anoutput indicative of motion at a block. The image characteristics 108may comprise one or more different types of image characteristics, suchas exposure information and colour information for one or more colourchannels. In other examples the camera module 101 may be any othersource of image characteristics 108 for use at the motion detector (e.g.module 101 may derive image characteristics from stored image frames).

In examples of the present invention, the image processor may provide ameasure of luminance for each block of a frame as an input value for themotion detector. This could be a measure of average luminance over twoor more pixels of a block, a measure of luminance of a randomly selectedor predetermined pixel of a block, or any other measure of luminanceassociated with a block. The measure of luminance in this caserepresents an image characteristic 108 on the basis of which motiondetection is performed. The measure of luminance may be provided in anysuitable manner. For example, a luma value may be used as a measure ofluminance for one or more pixels of a block (e.g. a luma component of aYUV colour space), or a measure of luminance for a block could compriseone or more individual colour components each expressing an averagevalue of the respective colour component for a block.

Binning controller 109 is configured to, for each block, maintain ahistogram representing an expected distribution of luminance for theblock based on image characteristics 108 received over time for theblock (e.g. in respect of a plurality of frames). Each bin of thehistogram represents a range of luminance values. The range of each binmay be a single luminance value. For example, in the case of luminanceexpressed as a luma value in the range 0 to 255, the histogram maycomprise 256 bins with each luminance value being allocated to itsrespective bin by the binning controller. In other examples, each binmay correspond to multiple bin values. The width of bins may vary overthe possible range of input values to the histogram.

The binning controller 109 is configured to maintain the histogram by,on receiving a luminance input value for a block from the imageprocessor, decaying the bin values of the histogram maintained for thatblock and allocating the received luminance value to its correspondingbin. Each bin may be a counter such that, on allocating a luminancevalue to a bin, the binning controller 109 is configured to incrementthe count value of the counter corresponding to that bin by somepredetermined value (e.g. one). In this manner, a summary of thefrequency distribution of the input values is formed.

A flowchart illustrating an example of the operation of the motiondetector 115 which includes the binning controller 109 is shown in FIG.6. On receiving a luminance value for a block 601 (e.g. from cameramodule 101), the binning controller 109 and block logic 110 performtheir respective functions in order to, respectively, maintain ahistogram for the block and form a motion output for the block. Theoperation of the binning controller and block logic is described in moredetail below. The binning controller and block logic may operate in anymanner, including in series or concurrently/in parallel. Preferablyhowever, the histogram of a block is used by the block logic prior tothe binning controller updating the histogram with the receivedluminance value. The block logic 110 represents an example of changedetection logic and the motion detector 115 an example of a dataprocessing device for detecting a change in the input values on which itis configured to operate. In other examples the input values may not bereceived in respect of a block of a frame and could be, for example,audio samples in which a change in level is to be detected.

An example illustrating how binning controller 109 may maintain ahistogram 112 at a memory 111 will now be described with respect toFIGS. 1 and 6. Memory 111 may be any kind of data store accessible tothe motion detector 115; it may be internal or external to the datastore and may comprise one or more storage elements. Each frame isdivided into one or more blocks each comprising one or more pixels ofthe frame, and in respect of each block a 256 bin histogram ismaintained at memory 111 by the binning controller.

Motion detector 115 may receive a measure of luminance for each block ofa frame (601 in FIG. 6). In this example, each frame is divided into 16non-overlapping blocks and the measure of luminance for each block is ameasure of the average luminance over the pixels of the block ascalculated by image processor 103. In this example, the binningcontroller 109 is configured to receive as image characteristics 108from the camera module 101 sums of the red, green and blue channels overthe pixels of each block of the image frame captured at the camerasensor 102. Such image characteristics are commonly available at acamera pipeline. The image characteristics or statistics may becalculated at image processor 103.

The motion detector 115 may process received image characteristics so asto form a luminance value or other value in respect of which a histogramis to be maintained for one or more blocks of a frame. This may beconsidered to form part of receiving the luminance for a block 601 inFIG. 6. For example, a luminance value, Y_(i), may be calculated for thei^(th) block of a frame as:

$\begin{matrix}{{Y_{i} = \frac{{0.299\mspace{20mu} R_{i}} + {0.587\mspace{20mu} G_{i}} + {0.114\mspace{20mu} B_{i}}}{N_{pixels}}},{0 \leq i < N_{blocks}}} & (1)\end{matrix}$

where R_(i), G_(i) and B_(i) are the sums of the red, green and bluevalues across the block which are received as image characteristics,N_(pixels) is the number of pixels in the block and N_(blocks) is thenumber of blocks the image is divided into. In the present exampleN_(blocks)=16. The luminance value, Y_(i), will be referred to as thecurrent luminance value.

The binning controller 109 is configured to maintain a histogram for oneor more blocks of a frame which, for each block, represents thefrequency distribution of luminance over time. On receiving a luminancevalue for a block, the binning controller updates the histogram for theblock (603 in FIG. 6) with the received luminance value in the mannerdescribed below. Each bin of a block's histogram may be initialized witha value appropriate to the implementation. For example, for a histogramhaving 256 bins, each bin of a histogram could initially be set to:

$\begin{matrix}{{h_{j} = \frac{1}{256}},{0 \leq j \leq 255}} & (2)\end{matrix}$

On receiving a luminance value for a block, each bin of the histogram,by h_(j) ^(old), for that block is decayed (604 in FIG. 6) so as todown-weight historical bin values relative to the calculated luminancevalue. This may be performed before the luminance value is allocated tothe histogram (605 in FIG. 6). For example, each bin of the histogram ofa block may be decayed in dependence on a predefined or adaptivelearning coefficient, learnCoeff which takes a value between 0 and 1:h _(j) ^(decayed)=(1−learnCoeff)*h _(j) ^(old), 0≤j≤255  (3)

Taking a simplistic approach, the L_(i) ^(th) histogram bin of thehistogram for the i^(th) block may then be updated using the currentluminance value according to:h _(j) ^(new)=learnCoeff+h _(j) ^(decayed) , j=Y _(i)  (4)

where learnCoeff serves as the contribution of the current luminancevalue to its respective bin. A suitable value for learnCoeff may beempirically determined.

Over a number of frames, a non-parametric representation of the expecteddistribution of pixel values for a particular block may be built upwhich allows for complex multi-modal behaviour to be captured. However,as can be seen from the exemplary histogram shown in FIG. 2, the abovesimplistic approach tends to lead to a sparse histogram because of thelimited number of image characteristics provided for each block and thenarrow bins relative to the range of possible luminance values. In FIG.2, the distribution of luminance values over the bins can be seen to beuneven with gaps 201 and peaks 202. In the present example, a singleluminance value is provided, but in other examples more than one valueof an image characteristic may be provided (e.g. different imagecharacteristics may be provided for different areas of a block).

An improved approach to allocating image characteristics to thehistogram bins will now be described. Rather than allocating each imagecharacteristic received for a block to the respective bin of thecorresponding histogram, each image characteristic is used to derive binvalues for a plurality of histogram bins located about the respectivebin in accordance with a binning distribution. This is 602 in FIG. 6.The binning distribution may be predefined (e.g. on initialisation ofapparatus or binning controller) or defined dynamically (e.g. independence on characteristics generated by the image processor forcaptured frames). For example, in the present case in which a luminancevalue received for a block expresses a mean luminance over the pixels ofthe block, the actual luminance values within the block may be assumedto have a Gaussian distribution having a mean, μ, centred on thereceived value and having a predefined or adaptive standard deviation,σ. Thus, defining the binning distribution as a Gaussian, the bins of ahistogram may be updated at 603 of FIG. 6 using:

$\begin{matrix}{{h_{j}^{new} = {{{learnCoeff}*{Ae}\frac{\left( {j - Y_{i}} \right)^{2}}{2\sigma^{2}}} + h_{j}^{decayed}}},{{Y_{i} - w} \leq j \leq {Y_{i} + w}}} & (5)\end{matrix}$

$\sigma = {\frac{\left( {w + 1} \right)}{3}.}$

where w is the half width of the Gaussian kernel and. By defining thestandard deviation in this manner, the kernel may be precalculated intoa buffer of length 2w+1. A is a normalization factor, for example:

$\begin{matrix}{A = \frac{1}{\sum\limits_{k = {- w}}^{w}\; e^{- \frac{k^{2}}{2\sigma^{2}}}}} & (6)\end{matrix}$

The allocation of the derived bin values to their respective bins (605in FIG. 6) may be performed after the bins of the histogram have beendecayed (604 in FIG. 6)—e.g. according to equation 3 above. Once the binvalues derived for a luminance value have been allocated to thehistogram, the binning controller may move onto the next block (606 inFIG. 6) by performing the same steps in respect of a histogrammaintained for that next block. A histogram 112 may be maintained atmemory 111 for one or more blocks of a frame such that, as luminancevalues are received for the blocks of a sequence of frames, eachhistogram represents a learned distribution of the frequency ofluminance values over time for the corresponding block.

A standard deviation for the binning distribution according to which binvalues are derived may be determined empirically for a given system(e.g. through optimising the accuracy of the motion detection performedby motion detector 115 using the histograms generated by the binningcontroller). A standard deviation could be determined or defined for anentire frame or for any region of a frame (e.g. a standard deviationcould be determined for each block of a frame, with the standarddeviation determined for a block being used when binning values of thatblock). A standard deviation may be adaptively determined by the binningcontroller or at any other element of the camera module or motiondetector—for example, by estimating a standard deviation from ahistogram formed by simply binning luminance values (e.g. as discussedabove with respect to FIG. 2). This allows a standard deviation tochange as, for example, the scene and/or light conditions change. Astandard deviation may be a statistic provided by the camera module(e.g. as a result of calculations performed at the image processor 103).A standard deviation need not be a true mathematical standard deviationand may be any suitable measure of the width of the underlying orexpected distribution of the image characteristic.

The binning controller may be configured to receive multiple luminancevalues for a block, with each luminance value being binned at ahistogram maintained for the block. The binning controller may beconfigured to receive multiple luminance values for a block, with eachluminance value being binned at a separate histogram maintained for therespective luminance value of the block such that multiple histogramsare maintained for the block. Each luminance value may be generated fora block in any manner: for example, each luminance value may begenerated in respect of a different pixel or group of pixels of theblock and/or each luminance value may be calculated in a different way(e.g. a different average of the same or different pixels of a block).

FIG. 3 shows a histogram 301 maintained by binning controller 109 suchthat luminance values received for a block are allocated to the block'shistogram according to a Gaussian distribution. It can be seen that thehistogram learned by the binning controller does not suffer from asparsity of values and represents a better approximation to the trueluminance probability distribution of a block. The binning controllermay be configured to allocate luminance values using an approximation toa true Gaussian distribution. Generally, any suitable distribution maybe used which is considered to provide sufficiently good performance forthe particular application—for example, a triangular distribution or arectangular distribution.

For image characteristics other than luminance, it may be appropriate toallocate image characteristics to histogram bins in accordance withdistributions other than Gaussian distributions which reflect theunderlying distribution of values of that image characteristic over ablock.

In FIG. 1, binning controller 109 is shown as being part of a motiondetector 115. This is merely an example and it will be appreciated thata binning controller need not be provided at a motion detector; abinning controller may be provided at any kind of apparatus, as adiscrete unit, or in software.

A learned histogram 112 maintained at memory 111 for a block of asequence of frames by the binning controller 109 may be used by theblock logic 110 as a representation of the probability distribution of aparticular luminance value occurring for a block. The probability of areceived luminance value belonging to the histogram distribution,P_(background), may be determined by the block logic 110 by means of alookup into the learned histogram at the bin corresponding to thereceived luminance value. This is 607 in FIG. 6. The histogram may be anormalised version of the histogram:

$\begin{matrix}{{{P_{background}\left( Y_{i} \right)} = h_{L_{i}}^{normalized}}{where}} & (7) \\{h_{j}^{normalized} = \frac{h_{j}}{\sum\limits_{k = 0}^{255}h_{k}}} & (8)\end{matrix}$

Each histogram may be stored in normalised form at memory 111 or thenormalised value of each bin may be calculated by the motion detector115 (e.g. at block logic 110). For example, the sum of the bins Σ_(k=0)²⁵⁵h_(k) used in equation 8 may be stored with a histogram such that thenormalised value of each histogram bin may be trivially formed from astored histogram 112 by the motion detector according to equation 8.

Generally the block logic may be configured to form some measure of thelikelihood of a received luminance value occurring given the frequencydistribution represented by the histogram. This is 608 in FIG. 6. Thelikelihood need not be a true probability and may take any suitablerange of values, not necessarily between 0 and 1.

The bin probability calculation may be performed using the histogramprior to a received luminance value being allocated to the histogram.Because the binning controller allocates luminance values to a histogramin accordance with some binning distribution, the histogram maintainedfor each block is smooth and can be directly sampled without the errorsdue to the uneven distribution (and hence inaccurate probabilities)which would occur with a sparse histogram.

The direct sampling of probabilities by the block logic 110 may not beentirely accurate because the incoming luminance value which is comparedto the learned histogram has itself a distribution associated it. Thiscan be addressed by assuming the same Gaussian distribution (or otherdistribution, as appropriate to the particular implementation) andconvolving this with the sampled probabilities. The probability of anincoming luminance value belonging to the histogram distribution maythen be calculated by the block logic as:

$\begin{matrix}{{P_{background}\left( Y_{i} \right)} = {\sum\limits_{j = {Y_{i} - w}}^{Y_{i} + w}\;{h_{j}^{normalized}*{Ae}^{- \frac{{({j - Y_{i}})}^{2}}{2\sigma^{2}}}}}} & (9)\end{matrix}$

Again, the distribution may be approximated. For example, ifcomputational resources are severely limited, the distribution could beapproximated with a box kernel:

$\begin{matrix}{{P_{background}\left( Y_{i} \right)} = {\frac{1}{{2\; w} + 1}{\sum\limits_{j = {Y_{i} - w}}^{Y_{i} + w}h_{j}^{normalized}}}} & (10)\end{matrix}$

The block logic 110 uses the probability calculated in respect of aluminance value received for a block in order to determine whether ablock is likely to represent motion or not. For example, the block logicmay form a binary decision as to whether a luminance value received fora block indicates that the block contains motion (i.e. representsforeground in the captured scene), with a decision of foreground motionbeing F_(i)=1 and a decision that the block represents background beingF_(i)=0. One approach is to compare the probability that a luminancevalue belongs to the histogram distribution maintained for that block(i.e. is background) to a predefined or adaptive threshold, T:

$\begin{matrix}{F_{i} = \left\{ \begin{matrix}1 & {{P_{background}\left( Y_{i} \right)} \leq T} \\0 & {{P_{background}\left( Y_{i} \right)} > T}\end{matrix} \right.} & (11)\end{matrix}$

A suitable threshold may be identified in any way, including:empirically determined; derived from the sequence of frames (e.g. as oneor more statistics generated at the image processor); and adaptivelycalculated in any suitable manner. This is 609 in FIG. 6 in the casethat the threshold is adaptive.

Using a predefined threshold does not typically take into account thepossible multi-modal nature of the luminance probability distributionrepresented by a histogram. The more modes a block may be in, the lessoverall probability is assigned to each mode meaning a lower thresholdvalue should be used; whereas for a single mode block a higher thresholdis more appropriate. It is therefore preferred that an adaptivelycalculated threshold is used.

For example, a suitable adaptive threshold may be determined as follows.A normalized histogram for a block is sorted into order of bin value asshown in FIG. 5 (which corresponds to the histogram of FIG. 3). This is610 in FIG. 6. The bins of the histogram are then summed in order ofdecreasing bin value so as to identify a value for n which satisfies:Σ_(k=0) h _(k) ^(sorted) ≤T _(user)  (12)

where T_(user) is a predefined threshold. This is 611 in FIG. 6. Thisthreshold represents the total probability of a luminance value receivedfor a block belonging to the histogram distribution (i.e. representingbackground in the scene captured by the camera sensor). It will beappreciated that the sorting step may not be explicitly performed andthat the bins may be summed in order of decreasing bin value in anysuitable manner. It will be appreciated that a high n indicates a spreadout histogram whereas a low n indicates a tightly clustered histogram.Note that the 256 bins representing the histogram of FIG. 3 arerepresented schematically in FIGS. 3 and 5 by a smaller number of bins.

In FIG. 5, the sum of the first n bins corresponds to the sum of the binvalues in the light shaded region 501 such that the threshold is crossedat bin 502: the value of this bin, which is indicated by line 503 in thefigure, is taken as an adaptive threshold T_(adaptive):T _(adaptive) =h _(n+1) ^(sorted)  (13)

This is 612 in FIG. 6. The adaptive threshold T_(adaptive) may be usedto identify whether a block represents motion according to:

$\begin{matrix}{F_{i} = \left\{ \begin{matrix}1 & {{P_{background}\left( Y_{i} \right)} \leq T_{adaptive}} \\0 & {{P_{background}\left( Y_{i} \right)} > T_{adaptive}}\end{matrix} \right.} & (14)\end{matrix}$

with a decision that a block represents foreground motion being F_(i)=1and a decision that the block represents background being F_(i)=0. Thisis 613 in FIG. 6. A decision generated by the block logic represents ameasure of the change in the luminance values received by the motiondetector. In other examples the output of the block logic may representa measure of the change in other input values. Generally a measure ofchange may be provided in any suitable manner and be expressed as valueshaving any suitable range, including as a binary value as in the presentexample.

Where the probability of a luminance value belonging to the distributionrepresented by a histogram of a block is lower than the adaptivethreshold, the block logic is configured to identify that block asrepresenting motion in the captured scene. Otherwise the block logic isconfigured to identify the block as not representing motion in thecaptured scene. It will be apparent that the adaptive threshold will belower for more spread out, multi-modal, probability distributions, andhigher for more tightly clustered histograms.

By forming a binary decision as to whether each block of a frame isconsidered to represent motion, block logic 110 may store a motionmatrix 114 in memory 111 which represents the block-wise motiondetermined to be present in a received frame. An example of theinformation held at stored matrix 114 is shown in FIG. 7 for a frame701. The frame is divided into 16 blocks, with the motion matrix 114indicating which of the blocks represents motion in the frame: blocks(e.g. 703) which are indicative of motion are labelled in the figurewith an ‘M’, and blocks (e.g. 702) which are not indicative of motionare not labelled in the figure with an ‘M’. These labels are merelyillustrative in the figure; in general any indication of whether or notmotion is determined to be present at a block may be used. Motion matrix114 may represent motion information for one or more blocks of a framein any suitable manner, including, for example, as a binary string, anarray of values, or as information encoded into or associated with theframe itself. A motion matrix may or may not be a rectangular array ofvalues.

In the above examples, luminance is provided to the motion detector 115as the image characteristic on the basis of which motion is assessed ineach block of a frame. However, using luminance can under certainconditions suffer from poor performance—for example, changes in lightingconditions in a scene can lead to false positive motion detections. Morerobust performance may be achieved using a measure of the spread of oneor more components for a block (e.g. the red, green and blue channels ofan RGB frame) and/or measure of the spread of the luminance of a block.A measure of spread may be any suitable measure of the variation in animage characteristic, such as a variance or a standard deviation.

An example will now be described with respect to FIG. 1 in which motiondetection is performed by the motion detector on the basis of a spatialstandard deviation formed for each of the red, green, and blue channelsof a block. The camera module 101 is configured to provide as imagecharacteristics 108 for each block of a frame the sum of the squaredvalues over the pixels of the block for each of red, green and bluechannels. From these sums it is possible to calculate the spatialstandard deviation of each of the red, green and blue channels. Forexample, the standard deviation of the red channel within a block may bedetermined according to:

$\begin{matrix}{\sigma_{red} = \sqrt{\left( {\frac{1}{N_{pixels}}{\sum R_{i}^{2}}} \right) - \left( \frac{R_{i}}{N_{pixels}} \right)^{2}}} & (15)\end{matrix}$

where R_(i) are the red channel pixel values of the pixels of the block,and N_(pixels) is the number of pixels in the block.

A compound spatial standard deviation for pixel values within a blockmay be calculated directly from the red, green and blue pixel values ofeach pixel. Such a compound spatial standard deviation could formed atthe binning controller 109 so as to represent a standard deviation inthe luminance of the block. For example, the standard deviation in theluminance of a block may be calculated at the binning controller fromred, green and blue pixel values (or their squares) received as imagecharacteristics:

$\begin{matrix}{\sigma_{luminance} = \sqrt{\left( \frac{{0.299{\sum R^{2}}} + {0.587{\sum G^{2}}} + {0.114{\sum B^{2}}}}{N_{pixels}} \right)_{i} - Y_{i}^{2}}} & (16)\end{matrix}$

where the luminance of a pixel Y_(i), (or its square) may, for example,be received from the camera module 101 as an image characteristic 108 orcalculated from red, green and blue pixel values (or their squares)received for each pixel.

The standard deviation in the luminance of a block σ_(luminance) may beused in place of a luminance value Y_(i) in equations 2 to 14 above. Anyof the examples, alternatives, or options described above with respectto FIGS. 1 to 7 and equations 1 to 14 to the use of luminance valuesapply mutatis mutandis to the use of standard deviation (or othermeasures of spread) in luminance or other image characteristics. Usingstandard deviation in place of luminance, the binning controller 109 isconfigured to maintain, for each block, a probability distribution ofthe spatial standard deviation in the luminance of the block. Thus, ateach frame, the standard deviation received for a block is binned intothe learned distribution for that block according to a binningdistribution. The block logic 110 is configured to form a binarydecision as to the presence or otherwise of motion in one or more blocksof a sequence of frames. The decision may be formed based on apredefined or adaptive threshold as described above.

In the examples described herein, decision logic 116 may be configuredto use the motion information generated at the motion detector 115 (e.g.a motion matrix) for one or more blocks of a frame to form a motionoutput for a frame 117. For example, block logic 116 may be configuredto identify motion in a frame when motion is detected in one or moreblocks which lie within a defined area of interest, or motion may beidentified when a predetermined contiguous number of blocks areindicative of motion. A motion output 117 for a frame may take anysuitable form, including as a binary indication or some measure of thedegree of motion observed in a frame (e.g. a number or proportion ofblocks which the motion detector 115 has identified as beingrepresentative of motion).

The decision logic may further receive (e.g. along with or included in amotion matrix) measures of the likelihood of block luminance values(e.g. as formed at the block logic) occurring given the frequencydistribution represented by a histogram formed by the binning controllerfor those blocks. This can allow the decision logic to further interpretthe motion matrix formed for a frame. For example, the decision logiccould be configured to check whether one or more blocks in which motionis not indicated in a motion matrix are surrounded in their respectiveframe by blocks in which motion is indicated in the motion matrix, and,if that is the case, interpret those surrounded blocks as also beingindicative of motion if their respective measures of likelihood lieclose to the predefined or adaptive threshold determined by the blocklogic.

A motion detector 115 configured according to the principles describedherein may be embodied at a low power processor. A motion output for ablock or frame (e.g. 117) generated by the motion detector or associateddecision logic 117 may be arranged to wake up another processor, such asencoder 106. This particular example enables motion-activated recordingto be implemented in an energy efficient manner.

A frame comprises a plurality of pixels each having an associated imagecharacteristic. The term pixel is used herein to refer to any kind ofimage element in respect of which an image characteristic is calculated,sampled, sensed or otherwise formed. A pixel is not limited to having aone-to-one correspondence to a sensing element of a digital camera (e.g.a red, green or blue sensing element or a collection thereof). The termrandom as used herein encompasses both truly random and pseudorandomdistributions, selections, or values; the term pseudorandom encompassesboth truly random and pseudorandom distributions, selections, or values.

The camera module and motion detector of FIG. 1 are shown as comprisinga number of functional blocks. This is schematic only and is notintended to define a strict division between different logic elements ofsuch entities. Each functional block may be provided in any suitablemanner. It is to be understood that intermediate values described hereinas being formed by any of the entities of a camera module or motiondetector need not be physically generated by the camera module or motiondetector at any point and may merely represent logical values whichconveniently describe the processing performed by the camera module ormotion detector between its input and output.

The flowcharts of FIGS. 4 and 6 are schematic only. The spacing andrelative position of the steps in the examples shown in those flowchartsis not to be taken as indicative of the precise time when each stepoccurs in absolute terms or relative to other steps. The flowchartsmerely illustrate an exemplary order in which steps may be performed inaccordance with the examples described herein.

Generally, any of the functions, methods, techniques or componentsdescribed above can be implemented in software, firmware, hardware(e.g., fixed logic circuitry), or any combination thereof. The terms“module,” “functionality,” “component”, “element”, “unit”, “block” and“logic” may be used herein to generally represent software, firmware,hardware, or any combination thereof. In the case of a softwareimplementation, the module, functionality, component, element, unit,block or logic represents program code that performs the specified taskswhen executed on a processor. The algorithms and methods describedherein could be performed by one or more processors executing code thatcauses the processor(s) to perform the algorithms/methods. Examples of acomputer-readable storage medium include a random-access memory (RAM),read-only memory (ROM), an optical disc, flash memory, hard disk memory,and other memory devices that may use magnetic, optical, and othertechniques to store instructions or other data and that can be accessedby a machine.

The terms computer program code and computer readable instructions asused herein refer to any kind of executable code for processors,including code expressed in a machine language, an interpreted languageor a scripting language. Executable code includes binary code, machinecode, bytecode, code defining an integrated circuit (such as a hardwaredescription language or netlist), and code expressed in a programminglanguage code such as C, Java or OpenCL. Executable code may be, forexample, any kind of software, firmware, script, module or librarywhich, when suitably executed, processed, interpreted, compiled,executed at a virtual machine or other software environment, cause aprocessor of the computer system at which the executable code issupported to perform the tasks specified by the code.

A processor, computer, or computer system may be any kind of device,machine or dedicated circuit, or collection or portion thereof, withprocessing capability such that it can execute instructions. A processormay be any kind of general purpose or dedicated processor, such as aCPU, GPU, System-on-chip, state machine, media processor, anapplication-specific integrated circuit (ASIC), a programmable logicarray, a field-programmable gate array (FPGA), or the like. A computeror computer system may comprise one or more processors.

It is also intended to encompass software which defines a configurationof hardware as described herein, such as HDL (hardware descriptionlanguage) software, as is used for designing integrated circuits, or forconfiguring programmable chips, to carry out desired functions. That is,there may be provided a computer readable storage medium having encodedthereon computer readable program code in the form of an integratedcircuit definition dataset that when processed in an integrated circuitmanufacturing system configures the system to manufacture apparatusconfigured to perform any of the methods described herein, or tomanufacture apparatus described herein. An integrated circuit definitiondataset may be, for example, an integrated circuit description.

An integrated circuit definition dataset may be in the form of computercode, for example as a netlist, code for configuring a programmablechip, as a hardware description language defining an integrated circuitat any level, including as register transfer level (RTL) code, ashigh-level circuit representations such as Verilog or VHDL, and aslow-level circuit representations such as OASIS® and GDSII. Higher levelrepresentations which logically define an integrated circuit (such asRTL) may be processed at a computer system configured for generating amanufacturing definition of an integrated circuit in the context of asoftware environment comprising definitions of circuit elements andrules for combining those elements in order to generate themanufacturing definition of an integrated circuit so defined by therepresentation. As is typically the case with software executing at acomputer system so as to define a machine, one or more intermediate usersteps (e.g. providing commands, variables etc.) may be required in orderfor a computer system configured for generating a manufacturingdefinition of an integrated circuit to execute code defining anintegrated circuit so as to generate the manufacturing definition ofthat integrated circuit.

An example of processing an integrated circuit definition dataset at anintegrated circuit manufacturing system so as to configure the system tomanufacture apparatus for binning an input value into an array of binswill now be described with respect to FIG. 8.

FIG. 8 shows an example of an integrated circuit (IC) manufacturingsystem 1002 which comprises a layout processing system 1004 and anintegrated circuit generation system 1006. The IC manufacturing system1002 is configured to receive an IC definition dataset (e.g. definingapparatus as described in any of the examples herein), process the ICdefinition dataset, and generate an IC according to the IC definitiondataset (e.g. which embodies apparatus as described in any of theexamples herein). The processing of the IC definition dataset configuresthe IC manufacturing system 1002 to manufacture an integrated circuitembodying apparatus as described in any of the examples herein.

The layout processing system 1004 is configured to receive and processthe IC definition dataset to determine a circuit layout. Methods ofdetermining a circuit layout from an IC definition dataset are known inthe art, and for example may involve synthesising RTL code to determinea gate level representation of a circuit to be generated, e.g. in termsof logical components (e.g. NAND, NOR, AND, OR, MUX and FLIP-FLOPcomponents). A circuit layout can be determined from the gate levelrepresentation of the circuit by determining positional information forthe logical components. This may be done automatically or with userinvolvement in order to optimise the circuit layout. When the layoutprocessing system 1004 has determined the circuit layout it may output acircuit layout definition to the IC generation system 1006. A circuitlayout definition may be, for example, a circuit layout description.

The IC generation system 1006 generates an IC according to the circuitlayout definition, as is known in the art. For example, the ICgeneration system 1006 may implement a semiconductor device fabricationprocess to generate the IC, which may involve a multiple-step sequenceof photo lithographic and chemical processing steps during whichelectronic circuits are gradually created on a wafer made ofsemiconducting material. The circuit layout definition may be in theform of a mask which can be used in a lithographic process forgenerating an IC according to the circuit definition. Alternatively, thecircuit layout definition provided to the IC generation system 1006 maybe in the form of computer-readable code which the IC generation system1006 can use to form a suitable mask for use in generating an IC.

The different processes performed by the IC manufacturing system 1002may be implemented all in one location, e.g. by one party.Alternatively, the IC manufacturing system 1002 may be a distributedsystem such that some of the processes may be performed at differentlocations, and may be performed by different parties. For example, someof the stages of: (i) synthesising RTL code representing the ICdefinition dataset to form a gate level representation of a circuit tobe generated, (ii) generating a circuit layout based on the gate levelrepresentation, (iii) forming a mask in accordance with the circuitlayout, and (iv) fabricating an integrated circuit using the mask, maybe performed in different locations and/or by different parties.

In other examples, processing of the integrated circuit definitiondataset at an integrated circuit manufacturing system may configure thesystem to manufacture apparatus without the IC definition dataset beingprocessed so as to determine a circuit layout. For instance, anintegrated circuit definition dataset may define the configuration of areconfigurable processor, such as an FPGA, and the processing of thatdataset may configure an IC manufacturing system to generate areconfigurable processor having that defined configuration (e.g. byloading configuration data to the FPGA).

In some embodiments, an integrated circuit manufacturing definitiondataset, when processed in an integrated circuit manufacturing system,may cause an integrated circuit manufacturing system to generate adevice as described herein. For example, the configuration of anintegrated circuit manufacturing system in the manner described abovewith respect to FIG. 8 by an integrated circuit manufacturing definitiondataset may cause a device as described herein to be manufactured.

In some examples, an integrated circuit definition dataset could includesoftware which runs on hardware defined at the dataset or in combinationwith hardware defined at the dataset. In the example shown in FIG. 8,the IC generation system may further be configured by an integratedcircuit definition dataset to, on manufacturing an integrated circuit,load firmware onto that integrated circuit in accordance with programcode defined at the integrated circuit definition dataset or otherwiseprovide program code with the integrated circuit for use with theintegrated circuit.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein. In view of the foregoing description itwill be evident to a person skilled in the art that variousmodifications may be made within the scope of the invention.

The invention claimed is:
 1. Apparatus for binning an input value intoan array of bins, each bin representing a range of input values and thebins collectively representing a histogram of input values, theapparatus comprising: an input for receiving the input value, the inputvalue representing an image characteristic for a block of pixels of aframe; a memory for storing the array; and a binning controllerconfigured to: derive a plurality of bin contributions in dependence onthe received input value according to a distribution centred on an inputvalue bin corresponding to the received input value, the distributionspanning a plurality of bins and each bin contribution having arespective bin dependent on the position of the bin contribution in thedistribution; and allocate the plurality of bin contributions to theplurality of bins in the array, each bin contribution being allocated toa bin selected according to the respective position of the bincontribution in the distribution.
 2. Apparatus as claimed in claim 1,wherein the binning distribution is a Gaussian distribution or anapproximation thereto.
 3. Apparatus as claimed in claim 1, wherein thebinning controller is configured to select the span of the distributionat least one of: according to one or more predefined or adaptiveparameters; and in dependence on a measure of the sparsity of thehistogram represented by the array of bins.
 4. Apparatus as claimed inclaim 1, wherein the binning controller is configured to, prior toallocating each of the plurality of bin contributions to its respectivebin, decay the values held at the array of bins according to apredefined decay factor.
 5. Apparatus as claimed in claim 1, wherein thebinning controller is configured to derive the plurality of bincontributions from the input value by scaling the distribution by theinput value, each of the bin contributions being the scaled height ofthe distribution at the respective bin of the array.
 6. Apparatus asclaimed in claim 1, wherein the input value is received at the inputexpressed as a plurality of component values.
 7. A data processingdevice for detecting a change in a sequence of input values, the dataprocessing device comprising: apparatus as claimed in claim 1 andconfigured to generate the histogram of input values by binning aplurality of input values of the sequence into the array of bins; andchange detection logic configured to use the histogram to estimate thelikelihood of the received input value and generate a measure of changein the input values in dependence on the estimated likelihood.
 8. A dataprocessing device as claimed in claim 7, wherein the estimatedlikelihood represents a measure of probability of the received inputvalue occurring given the frequency distribution of input valuesrepresented by the histogram.
 9. A data processing device as claimed inclaim 8, wherein the change detection logic is configured to form themeasure of probability in dependence on the value of the bin in thearray corresponding to the received input value.
 10. A data processingdevice as claimed in claim 9, wherein the change detection logic isconfigured to derive a normalised histogram from the bins of the arrayand use the value of the bin of the normalised histogram whichcorresponds to the received input value as the measure of probability.11. A data processing device as claimed in claim 10, wherein the changedetection logic is configured to derive the normalised histogram suchthat the bins of the histogram sum to
 1. 12. A data processing device asclaimed in claim 7, wherein the change detection logic is configured togenerate the measure of change in the input values by comparing theestimated likelihood to a predefined or adaptive threshold.
 13. A dataprocessing device as claimed in claim 12, wherein the measure of changeis indicative of a change in the sequence of input values if theestimated likelihood exceeds the predefined or adaptive threshold.
 14. Adata processing device as claimed in claim 12, wherein the changedetection logic is configured to form the adaptive threshold by summingthe bins in order of decreasing value and identifying a threshold bin atwhich that sum first exceeds a predefined total, and to derive theadaptive threshold in dependence on the value of the threshold bin. 15.A data processing device as claimed in claim 7, wherein the input valuesare at least one of: image characteristics received for a block ofpixels of a frame and the data processing device is for detecting motionin the block of pixels; and audio characteristics received for an audiosignal and the data processing device is for detecting a change in levelin the audio signal.
 16. A data processing device as claimed in claim 7,wherein the input value is one or more of luminance, hue, lightness,brightness, chroma, colorfulness, saturation, or a measure of variationtherein.
 17. A data processing device as claimed in claim 7, configuredto wake up a processor in dependence on the measure of change.
 18. Amethod of binning an input value into an array of bins, each binrepresenting a range of input values and the bins collectivelyrepresenting a histogram of input values, the method comprising:receiving an input value, the input value representing an imagecharacteristic for a block of pixels of a frame; deriving a plurality ofbin contributions in dependence on the received input value according toa distribution centred on the input value bin corresponding to thereceived input value, the distribution spanning a plurality of bins andeach bin contribution having a respective bin indicated by the positionof the bin contribution in the distribution; and allocating theplurality of bin contributions to the plurality of bins, each bincontribution being allocated to a bin selected according to therespective position of the bin contribution in the distribution.
 19. Anon-transitory computer readable storage medium having stored thereon acomputer readable description of an integrated circuit that, whenprocessed in an integrated circuit manufacturing system, causes theintegrated circuit manufacturing system to manufacture apparatus forbinning an input value into an array of bins, each bin representing arange of input values and the bins collectively representing a histogramof input values, the apparatus comprising: an input for receiving theinput value, the input value representing an image characteristic for ablock of pixels of a frame; a memory for storing the array; and abinning controller configured to: derive a plurality of bincontributions in dependence on the received input value according to adistribution centred on the input value bin corresponding to thereceived input value, the distribution spanning a plurality of bins andeach bin contribution having a respective bin dependent on the positionof the bin contribution in the distribution; and allocate the pluralityof bin contributions to the plurality of bins in the array, each bincontribution being allocated to a bin selected according to therespective position of the bin contribution in the distribution; whereinthe apparatus is embodied in hardware on an integrated circuit.